<?php
session_start ();
$_SESSION ['pathway'] = '..';
$_SESSION ['pathway_js'] = '/genetiquespataxeurospa';
include_once ("../header.php");

/*
 * //
 */

if (! isset ( $_SESSION ['id'] )) {
	echo "<table class='principale'><tr><td>Session expired</td></tr>";
	echo "<a href='" . $_SESSION ['pathway'] . "/index.php'>Start</a></table>";
} elseif ($_SESSION ['acces_genetique'] < 2) {
	echo "<table class='principale'><tr><td>Restricted area</td></tr>";
	echo "<a href='" . $_SESSION ['pathway'] . "/start.php'>Home</a></table>";
} else {
	
	?><p>
	<a href='../index.php'>Home</a> > <a href='./index.php'>Genetics</a> >
	Sample data
</p><?php
	
	$formatdate = $_SESSION ['date'];
	
	?>

<!-- sample data --------------------------->

<form action='index.php?page=saisie&amp;submit=yes&amp;type=sample'
	method='post' enctype='multipart/form-data'>
	<div id='sampledata' class='off rubrique'>

		<table class='principale'>
			<tr>
				<td>Code ID Family : <br /> <input type="text" maxlength="3"
					size="2" name="code1" id="code1" />- <input type="text"
					maxlength="3" size="1" name="code2" id="code2" />- <input
					type="text" maxlength="3" size="1" name="code3" id="code3" />- <input
					type="text" maxlength="4" size="1" name="code4" id="code4" />-
				</td>
				<td>Individual&#40;s&#41; : <br /> <input type='text'
					style='width: 100px;' name='code5' id="code5" />&#42;&#40;&#34;&#59;&#34;
					as separator&#41;
				</td>
				<td>External code : <br /> <input type='text' style='width: 100px;'
					name='codeexternesample' />&#42;&#40;&#34;&#59;&#34; as
					separator&#41;
				</td>
			</tr>
			<tr>
				<td><input type="button" name="see_clinics" Value="See clinics"
					onClick="recupere_clinique('code1', 'code2', 'code3', 'code4', 'code5');" /></td>
			</tr>
		</table>


		<table class='principale'>
			<tr>
				<td>Date :</td>
				<td><input type='text' style='width: 100px;' name='datesample'
					value='<?php echo $formatdate; ?>' />&#42;(yyyy-mm-dd)</td>
			</tr>
			<tr>
				<td>User :</td>
				<td><input type='text' style='width: 100px' name='user'
					value='<?php echo strtoupper($_SESSION['id']); ?>' readonly /></td>
			</tr>
			<tr>
				<td>DNA :</td>
				<td><select name='dnasample1' size='1'>
						<option></option>
						<option>genomic</option>
						<option>RNA</option>
						<option>amplified</option>
				</select></td>
			</tr>
			<tr>
				<td>Source :</td>
				<td><select name='sourcednasample' size='1'
					onchange='toggleDisplayAutrePrelevement(this.value)'>
						<option></option>
						<option>saliva</option>
						<option>fribroblastes</option>
						<option>blood cells</option>
						<option>lymphoblastoic cell lines</option>
						<option>other ..</option>
				</select></td>
				<td><div id='divautreprelevementsample' style='display: none'>
						Other : <input type='text' style='width: 100px;' name='dnasample2' />
					</div></td>
			</tr>
			<tr>
				<td>Sent to :</td>
				<td><input type='text' style='width: 100px;' name='wheresample' />
					For <input type='text' style='width: 100px;' name='whysample' /></td>
			</tr>
			<tr>
				<td>Quality :</td>
				<td><label><input type='checkbox' name='qualitysample[]'
						value='impaired' /> impaired </label><br /> <label><input
						type='checkbox' name='qualitysample[]' value='depleted' />
						depleted </label></td>
			</tr>
			<tr>
				<td>Concentration :</td>
				<td><input type='text' style='width: 30px;'
					name='concentrationsample' value='200' />ng&#47;&#956;L</td>
			</tr>
			<tr>
				<td>Quantity :</td>
				<td><input type='text' style='width: 30px;'
					name='quantitemicrolitre' value='' />&#956;L<br /> <input
					type='text' style='width: 30px;' name='quantitenanogramme' value='' />ng</td>
			</tr>
			<tr>
				<td>Attached file(s) :</td>
				<td><input type='file' name='fichierattachesample' size="5" /></td>
			</tr>
		</table>
	</div>

	<div id='conclusion_sampledata' class='off conclusion'>
		<table class='principale'>
			<tr>
				<td><h3>To do :</h3></td>
				<td>1) Sample :</td>
				<td><select name='todoprelevementtraitement1' size='1'
					onchange='toggleDisplayTodoPrelevement(this.value)'>
						<option></option>
						<option>redemander</option>
						<option>reprélever</option>
						<option>deceased patient</option>
						<option>reprécipiter</option>
						<option>repurifier</option>
						<option>other ..</option>
				</select></td>
			</tr>
			<tr>
				<td><div id='divtodoprelevement' style='display: none'>
						Other : <input type='text' style='width: 100px;'
							name='todoprelevementtraitement2' />
					</div></td>
			</tr>
			<tr>
				<td></td>
				<td>2) Genetic tests:</td>
				<td><textarea name='testsgenetiques' cols='15' rows='3'></textarea></td>
			</tr>
			<tr>
				<td><input type='submit' value=' Submit ' /></td>
			</tr>
		</table>
	</div>

</form>

<?php
}

include ("../footer.php");
?>
